1. Field of the Invention
The present invention relates to a resource management system which manages accessing to a shared resource in a multi-processor system comprising a plurality of CPU's.
2. Related Background Art
A multi-processor system has a shared memory and a shared I/O as shared resources and it is necessary to inhibit accessing to a shared resource used by one processor, by other processors. That is, an exclusive control is essential.
For such a system, a semaphore control system has been used. In the semaphore control system, when each CPU accesses a shared resource, it has a semaphore corresponding to individual resources, on the shared memory to control an accessing right in order to prevent mutual interference.
However, in the prior art, the accessing right control area such as a semaphore is provided on the shared memory, and if the accessing is permitted as a result of a check of the control area, the accessing right is established to access a block area in the shared memory, and if the accessing is not permitted, the check is repeated until the accessing is permitted.
This system has the following drawbacks.
(1) Assuming that the CPU's have the same priority level, when one CPU is permitted the access as a result of the check of the semaphore, another CPU may establish the accessing right earlier before the one CPU establishes the accessing right. In this case, access competition takes place between those CPU's. Thus, instead of one semaphore, a plurality of check mechanisms or a new cycle need be provided. As a result, the process is complex and a longer time is needed before the accessing actually starts.
(2) In order to rapidly check and establish the accessing right, it is necessary to prioritize the accessing rights among the CPU's. However, this needs the prioritization for each resource and the process is complex and of large amount.